package wjx.ssm.query;

public class BaseQuery{
	//每页数
	protected Integer pageSize=20;
	//起始行
	protected Integer startRow;//起始行
	//页码
	protected Integer pageNo=1;
	//Sql查询字段
	protected String fields;
	

	public void setPageNo(Integer pageNo) {
		this.pageNo = pageNo;
		this.startRow = (pageNo-1)*this.pageSize;
	}
	public BaseQuery setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
		this.startRow = (pageNo-1)*this.pageSize;
		return this;
	}
	
	public Integer getPageSize() {
		return pageSize;
	}
	public Integer getStartRow() {
		return startRow;
	}
	public void setStartRow(Integer startRow) {
		this.startRow = startRow;
	}
	public Integer getPageNo() {
		return pageNo;
	}
	public String getFields() {
		return fields;
	}
	public void setFields(String fields) {
		this.fields = fields;
	}
	
}
